@(game: QuizGame)
@player1 = @{ game.getPlayers().get(0) }
@player2 = @{ game.getPlayers().get(1) }
@winnerMessage = @{
    game.getWinner() match {
        case null => Messages("quiz.tie")
        case winner: QuizUser => Messages("quiz.winner", winner.getName())
    }
}
@main("main.quiz",
      pageid = "winnerpage",
      navigation = immutable.Map(routes.Authentication.logout.url -> "login.logout")) {
	<section role="main">
		<!-- winner message -->
            <section id="roundwinner" aria-labelledby="roundwinnerheading">
                <h2 id="roundwinnerheading" class="accessibility">@Messages("quiz.result")</h2>
                <p class="roundwinnermessage">@winnerMessage</p>
            </section>
        
            <!-- round info -->    
            <section id="roundinfo" aria-labelledby="roundinfoheading">
                <h2 id="roundinfoheading" class="accessibility">@Messages("quiz.gameinfo")</h2>
                <div id="player1info" class="playerinfo">
                    <span id="player1name" class="playername">@player1.getName()</span>
                    <p id="player1roundcounter" class="playerroundcounter">@Messages("quiz.wonrounds"): <span id="player1wonrounds" class="playerwonrounds">@game.getWonRounds(player1)</span></p>
                </div>
                <div id="player2info" class="playerinfo">
                    <span id="player2name" class="playername">@player2.getName()</span>
                    <p id="player2roundcounter" class="playerroundcounter">@Messages("quiz.wonrounds"): <span id="player2wonrounds" class="playerwonrounds">@game.getWonRounds(player2)</span></p>
                </div>
                @helper.form(routes.Quiz.newGame) {
                    <input id="next" type="submit" value="@Messages("quiz.start")"/>
                }
            </section>
            <script type="text/javascript">
            //<![CDATA[
	            $(document).ready(function(){
	         	   if(supportsLocalStorage()){
	         		   localStorage["lastGame"] = new Date().getTime();
	         	   }
	            });
            //]]>
            </script>
    </section>
}